<template>
  <div class="cart">
<div class="cart-Complete">
<h3>商品已成功加入购物车!</h3>
  <div class="goods">
    <div class="left-gocart">
      <img :src="skuInfo.skuDefaultImg"/>
      <div class="left-info">
      <p>{{skuInfo.skuName}}</p>
      <p>{{ skuInfo.skuDesc}} &nbsp;&nbsp;数量:{{this.$route.query.skuNum}}</p>
      </div>
    </div>
  <div class="right-gocart">
    <router-link :to="`/detail/${skuInfo.id}`">查看商品详情</router-link>
    <router-link to="/shopCart">去购物车结算 ></router-link>
  </div>
  </div>
</div>
  </div>
</template>

<script>
import Header from "../../components/header";
export default {
  name: "AddCartSuccess",
  components: {Header},
  mounted() {
  },
  computed:{
    skuInfo() {
      return JSON.parse((sessionStorage.getItem('SKUINFO')))
    }
  }
}
</script>

<style scoped lang="less">
.cart{
  background-color: #f4f4f4;
}
.cart-Complete {
  width: 1200px;
  margin: 0 auto;
  h3 {
    padding: 15px 0;
    font-size: 16px;
    font-weight: normal;
    color: #6aaf04;
  }
  .goods{
    height: 65px;
    padding: 10px 0;
    .left-gocart{
      float: left;
      height: 66px;
      img{
        width: 62px;
        height: 66px;
        float: left;
        border: 1px solid #dfdfdf;
      }
  .left-info{
    float: left;
    margin-left: 10px;
    width: 500px;
    p:nth-child(1){
      font-size: 14px;
      color:rgb(68, 68, 68);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      height: 28px;
     line-height: 28px;
    }
    p:nth-child(2){
      color: #aaa;
      font-size: 12px;
    }
  }
    }
    .right-gocart{
      height: 40px;
      float: right;
      margin-top: 20px;
      a{
        background-color: #eee;
        border: 1px solid #e1e1e1;
        color: #333;
        padding: 7px 36px;
      }
    }
  }
}
</style>
